<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" th:href="@{/styles.css}"/>
    <title>Title</title>
</head>
<body>
<form method="post" th:action="@{/courses}" th:object="${students}">
    <table border="0" align="center" width="600">
        <tr>
            <td colspan="3" align="center" height="40" id="title">学生信息</td>
        </tr>
        <tr>
            <td id="t" align="right"><label>用户名:</label></td>
            <td th:text="*{username}"></td>
            <td><input hidden type="text" th:field="*{username}" /></td>
        </tr>
        <tr>
            <td id="t" align="right"><label>姓名:</label></td>
            <td><input type="text" th:field="*{name}"/></td>
            <td><span class="validationError" th:if="${#fields.hasErrors('name')}" th:erros="*{name}">请输入你的名字</span>
            </td>
        </tr>
        <tr>
            <td id="t" align="right"><label>学号:</label></td>
            <td><input type="text" th:field="*{sno}"/></td>
            <td><span class="validationError" th:if="${#fields.hasErrors('sno')}" th:erros="*{sno}">学号长度必须为10</span>
            </td>
        </tr>
        <tr>
            <td id="t" align="right"><label>年级:</label></td>
            <td><input type="text" th:field="*{grade}"/></td>
            <td><span class="validationError" th:if="${#fields.hasErrors('grade')}"
                      th:erros="*{grade}">请输入你的年级，如18级</span></td>
        </tr>
        <tr>
            <td id="t" align="right"><label>专业:</label></td>
            <td><input type="text" th:field="*{department}"/></td>
            <td><span class="validationError" th:if="${#fields.hasErrors('department')}" th:erros="*{department}">请输入你的专业</span>
            </td>
        </tr>
        <tr>
            <td id="t" align="right"><label>学院:</label></td>
            <td><input type="text" th:field="*{academy}"/></td>
            <td><span class="validationError" th:if="${#fields.hasErrors('academy')}"
                      th:erros="*{academy}">请输入你的学院</span></td>
        </tr>
        <tr>
            <td colspan="3" align="center" height="40">
                <input type="submit" value="提交信息">
            </td>
        </tr>
    </table>
</form>
<form method="get" th:action="@{/logout}">
    <table border="0" align="center" width="600">
        <tr>
            <td colspan="3" align="center" height="40">
                <input type="submit" value="退出">
            </td>
        </tr>
    </table>
</form>
</div>

</body>
</html>